package com.wicket.okrcalc.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrcalc.biz.service.dto.common.*;
import com.wicket.okrcalc.biz.service.dto.req.*;
import com.wicket.okrcalc.biz.service.dto.res.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import com.wicket.okrcalc.common.util.CommonFunctionHelper;
import com.wicket.okrcalc.common.util.RedisUtil;
import com.wicket.okrcalc.common.exception.BizException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

import java.util.List;
import java.util.stream.Collectors;
import com.wicket.okrcalc.common.exception.Assert;
import com.wicket.okrcalc.biz.service.nb.NbCalculationRules;
import com.wicket.okrcalc.base.service.MOmsStandardDataResultService;
import com.wicket.okrcomponent.integration.dto.CalculateDataBigMiniRecordComRespDto;
import com.wicket.okrcomponent.integration.dto.CalculateDataBigMiniRecordComReqDto;
import com.wicket.okrcomponent.integration.dto.DataBigMiniRecordDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcomponent.integration.FwCompInterfaceModeClient;
import com.wicket.okrcalc.biz.service.InterfaceModeService;
//import com.wicket.okrcalc.biz.service.dto.common.DataBigMiniRecordDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class CalculationRulesServiceImpl implements com.wicket.okrcalc.biz.service.CalculationRulesService {
    @Resource
    private RedisUtil redisUtil;
//@Resource
 //private MCustomFieldsService mCustomFieldsService;
@Resource
  private NbCalculationRules nbCalculationRules;
@Resource
  private MOmsStandardDataResultService mOmsStandardDataResultService;
@Resource
  private FwCompInterfaceModeClient fwCompInterfaceModeClient;
@Resource
  private InterfaceModeService interfaceModeService;
//@Resource
 //private MCustomFields3Service mCustomFields3Service;
/**
   * D4-计算两个数相减服务(公共)[3365]
   * gen by moon at 2/26/2023, 5:09:40 PM
   */
  @Trace(operationName = "D4-计算两个数相减服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateSubtractionOfTwoNumServiceComRespDto calculateSubtractionOfTwoNumServiceCom(CalculateSubtractionOfTwoNumServiceComReqDto reqDto){
    
      
      CalculateSubtractionOfTwoNumRespDto subtractionOfTwoNumRes_1 =null;
//步骤0: M-计算两个数相减（特殊方法） - calculateSubtractionOfTwoNum
     //ModelCode: subtractionOfTwoNum
        CalculateSubtractionOfTwoNumRespDto subtractionOfTwoNumRes = null;
    CalculateSubtractionOfTwoNumReqDto subtractionOfTwoNumReq=new CalculateSubtractionOfTwoNumReqDto();
  if(reqDto!=null){
      subtractionOfTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703142_1
subtractionOfTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703143_1
      subtractionOfTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:133492_1
subtractionOfTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:133493_1
    }
  
    /*M-计算两个数相减（特殊方法）[2968]  用户指标数据计算，入参两个数值，计算两数之差 */
//    Assert.isNull(subtractionOfTwoNumReq.getCalcPara1(),"D4-计算两个数相减服务(公共)-M-计算两个数相减（特殊方法）-计算入参1不能为空",false);
//Assert.isNull(subtractionOfTwoNumReq.getCalcPara2(),"D4-计算两个数相减服务(公共)-M-计算两个数相减（特殊方法）-计算入参2不能为空",false);
      subtractionOfTwoNumRes = nbCalculationRules.calculateSubtractionOfTwoNum(subtractionOfTwoNumReq);
      
      
      subtractionOfTwoNumRes_1 = subtractionOfTwoNumRes;
    
CalculateSubtractionOfTwoNumServiceComRespDto retData = new CalculateSubtractionOfTwoNumServiceComRespDto();
  if(subtractionOfTwoNumRes_1!=null){
      retData.setCalcResult(subtractionOfTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:133497_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算两个数复合计算服务(公共)[3568]
   * gen by moon at 12/10/2022, 4:49:27 PM
   */
  @Trace(operationName = "D4-计算两个数复合计算服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateComplexCalcOfTwoNumServiceComRespDto calculateComplexCalcOfTwoNumServiceCom(CalculateComplexCalcOfTwoNumServiceComReqDto reqDto){
    
      
      CalculateComplexCalcOfTwoNumServiceRespDto complexCalcOfTwoNumRes_1 =null;
//步骤0: M-计算两个数复合计算（特殊方法） - calculateComplexCalcOfTwoNumService
     //ModelCode: complexCalcOfTwoNum
        CalculateComplexCalcOfTwoNumServiceRespDto complexCalcOfTwoNumRes = null;
    CalculateComplexCalcOfTwoNumServiceReqDto complexCalcOfTwoNumReq=new CalculateComplexCalcOfTwoNumServiceReqDto();
  if(reqDto!=null){
      complexCalcOfTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:158848_1
complexCalcOfTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:158849_1
complexCalcOfTwoNumReq.setCalcPara3(reqDto.getCalcPara3());//SimpleFieldAssign//sourceId:158850_1
complexCalcOfTwoNumReq.setCalcPara4(reqDto.getCalcPara4());//SimpleFieldAssign//sourceId:158851_1
complexCalcOfTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:160378_1
complexCalcOfTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:490327_1
    }
  
    /*M-计算两个数复合计算（特殊方法）[3567]  用于指标数据计算（如主观得分）。固定公式(A1*A2+B1*B2）
A1：{当前主观得分}，A2：{权重1}，B1：{过程主观得分}，B2：{权重2} */
    Assert.isNull(complexCalcOfTwoNumReq.getCalcPara1(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-计算入参1不能为空",false);
Assert.isNull(complexCalcOfTwoNumReq.getCalcPara2(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-计算入参2不能为空",false);
Assert.isNull(complexCalcOfTwoNumReq.getCalcPara3(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-计算入参3不能为空",false);
Assert.isNull(complexCalcOfTwoNumReq.getCalcPara4(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-计算入参4不能为空",false);
Assert.isNull(complexCalcOfTwoNumReq.getDecimalDigitsLastRules(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-小数最后一位规则不能为空",false);
Assert.isNull(complexCalcOfTwoNumReq.getDecimalPointRules(),"D4-计算两个数复合计算服务(公共)-M-计算两个数复合计算（特殊方法）-小数点规则不能为空",false);
      complexCalcOfTwoNumRes = nbCalculationRules.calculateComplexCalcOfTwoNumService(complexCalcOfTwoNumReq);
      
      
      complexCalcOfTwoNumRes_1 = complexCalcOfTwoNumRes;
    
CalculateComplexCalcOfTwoNumServiceComRespDto retData = new CalculateComplexCalcOfTwoNumServiceComRespDto();
  if(complexCalcOfTwoNumRes_1!=null){
      retData.setCalcResult(complexCalcOfTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:158943_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集去除最大最小求平均服务(公共)[3439]
   * gen by moon at 12/10/2022, 4:49:28 PM
   */
  @Trace(operationName = "D4-计算数据集去除最大最小求平均服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculatePartAveOfMultipleNumServiceComRespDto calculatePartAveOfMultipleNumServiceCom(CalculatePartAveOfMultipleNumServiceComReqDto reqDto){
    
      
      CalculatePartAveOfMultipleNumRespDto partAveOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集去除最大最小求平均（特殊方法） - calculatePartAveOfMultipleNum
     //ModelCode: partAveOfMultipleNum
        CalculatePartAveOfMultipleNumRespDto partAveOfMultipleNumRes = null;
    CalculatePartAveOfMultipleNumReqDto partAveOfMultipleNumReq=new CalculatePartAveOfMultipleNumReqDto();
  if(reqDto!= null&&  reqDto.getPartAveOfMultipleNumList() !=null&& !CollectionUtil.isEmpty(reqDto.getPartAveOfMultipleNumList())){
      partAveOfMultipleNumReq.setPartAveOfMultipleNumList(reqDto.getPartAveOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, PartAveOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:486553_1
    }
if(reqDto!=null){
      partAveOfMultipleNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:180102_1
partAveOfMultipleNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:180103_1
    }
  
    /*M4-计算数据集去除最大最小求平均（特殊方法）[3435]  用于数据集中去除最大一条和最小一条后所有数据平均值算法 */
    Assert.isNull(partAveOfMultipleNumReq.getDecimalPointRules(),"D4-计算数据集去除最大最小求平均服务(公共)-M4-计算数据集去除最大最小求平均（特殊方法）-小数点规则不能为空",false);
Assert.isNull(partAveOfMultipleNumReq.getDecimalDigitsLastRules(),"D4-计算数据集去除最大最小求平均服务(公共)-M4-计算数据集去除最大最小求平均（特殊方法）-小数最后一位规则不能为空",false);
      partAveOfMultipleNumRes = nbCalculationRules.calculatePartAveOfMultipleNum(partAveOfMultipleNumReq);
      
      
      partAveOfMultipleNumRes_1 = partAveOfMultipleNumRes;
    
CalculatePartAveOfMultipleNumServiceComRespDto retData = new CalculatePartAveOfMultipleNumServiceComRespDto();
  if(partAveOfMultipleNumRes_1!=null){
      retData.setCalcResult(partAveOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:139307_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集求平均值服务(公共)[3438]
   * gen by moon at 12/10/2022, 4:49:29 PM
   */
  @Trace(operationName = "D4-计算数据集求平均值服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateAverageOfMultipleNumServiceComRespDto calculateAverageOfMultipleNumServiceCom(CalculateAverageOfMultipleNumServiceComReqDto reqDto){
    
      
      CalculateAverageOfMultipleNumRespDto averageOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集求平均值（特殊方法） - calculateAverageOfMultipleNum
     //ModelCode: averageOfMultipleNum
        CalculateAverageOfMultipleNumRespDto averageOfMultipleNumRes = null;
    CalculateAverageOfMultipleNumReqDto averageOfMultipleNumReq=new CalculateAverageOfMultipleNumReqDto();
  if(reqDto!= null&&  reqDto.getAverageOfMultipleNumList() !=null&& !CollectionUtil.isEmpty(reqDto.getAverageOfMultipleNumList())){
      averageOfMultipleNumReq.setAverageOfMultipleNumList(reqDto.getAverageOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, AverageOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:139293_1
    }
if(reqDto!=null){
      averageOfMultipleNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:180223_1
averageOfMultipleNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:180224_1
    }
  
    /*M4-计算数据集求平均值（特殊方法）[3434]  用于数据集中所有数据平均值数据算法 */
    Assert.isNull(averageOfMultipleNumReq.getDecimalPointRules(),"D4-计算数据集求平均值服务(公共)-M4-计算数据集求平均值（特殊方法）-小数点规则不能为空",false);
Assert.isNull(averageOfMultipleNumReq.getDecimalDigitsLastRules(),"D4-计算数据集求平均值服务(公共)-M4-计算数据集求平均值（特殊方法）-小数最后一位规则不能为空",false);
      averageOfMultipleNumRes = nbCalculationRules.calculateAverageOfMultipleNum(averageOfMultipleNumReq);
      
      
      averageOfMultipleNumRes_1 = averageOfMultipleNumRes;
    
CalculateAverageOfMultipleNumServiceComRespDto retData = new CalculateAverageOfMultipleNumServiceComRespDto();
  if(averageOfMultipleNumRes_1!=null){
      retData.setCalcResult(averageOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:139296_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集求最小值服务(公共)[3437]
   * gen by moon at 11/16/2022, 4:06:23 PM
   */
  @Trace(operationName = "D4-计算数据集求最小值服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateMinimumOfMultipleNumServiceComRespDto calculateMinimumOfMultipleNumServiceCom(CalculateMinimumOfMultipleNumServiceComReqDto reqDto){
    
      
      CalculateMinimumOfMultipleNumRespDto minimumOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集求最小值（特殊方法） - calculateMinimumOfMultipleNum
     //ModelCode: minimumOfMultipleNum
        CalculateMinimumOfMultipleNumRespDto minimumOfMultipleNumRes = null;
    CalculateMinimumOfMultipleNumReqDto minimumOfMultipleNumReq=new CalculateMinimumOfMultipleNumReqDto();
  if(reqDto!=null){
      minimumOfMultipleNumReq.setMinimumOfMultipleNumList(reqDto.getMinimumOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, MinimumOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:139285_1
    }
  
    /*M4-计算数据集求最小值（特殊方法）[3433]  用于数据集中最小一条数据算法 */
    
      minimumOfMultipleNumRes = nbCalculationRules.calculateMinimumOfMultipleNum(minimumOfMultipleNumReq);
      
      
      minimumOfMultipleNumRes_1 = minimumOfMultipleNumRes;
    
CalculateMinimumOfMultipleNumServiceComRespDto retData = new CalculateMinimumOfMultipleNumServiceComRespDto();
  if(minimumOfMultipleNumRes_1!=null){
      retData.setCalcResult(minimumOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:139288_1
    }
  

  
  
return retData;
  }
/**
   * 待删除--D4-计算数据集求最大值服务(公共)[3436]
   * gen by moon at 12/3/2022, 3:07:03 AM
   */
  @Trace(operationName = "待删除--D4-计算数据集求最大值服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateMaxOfMultipleNumServiceComRespDto calculateMaxOfMultipleNumServiceCom(CalculateMaxOfMultipleNumServiceComReqDto reqDto){
    
      
      CalculateMaxOfMultipleNumRespDto maxOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集求最大值（特殊方法） - calculateMaxOfMultipleNum
     //ModelCode: maxOfMultipleNum
        CalculateMaxOfMultipleNumRespDto maxOfMultipleNumRes = null;
    CalculateMaxOfMultipleNumReqDto maxOfMultipleNumReq=new CalculateMaxOfMultipleNumReqDto();
  if(reqDto!=null){
      maxOfMultipleNumReq.setMaxOfMultipleNumList(reqDto.getMaxOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, MaxOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:139280_1
    }
  
    /*M4-计算数据集求最大值（特殊方法）[3432]  用于数据集中最大一条数据算法 */
    
      maxOfMultipleNumRes = nbCalculationRules.calculateMaxOfMultipleNum(maxOfMultipleNumReq);
      
      
      maxOfMultipleNumRes_1 = maxOfMultipleNumRes;
    
CalculateMaxOfMultipleNumServiceComRespDto retData = new CalculateMaxOfMultipleNumServiceComRespDto();
  if(maxOfMultipleNumRes_1!=null){
      retData.setCalcResult(maxOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:139282_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集取最新服务(公共)[3430]
   * gen by moon at 6/11/2023, 1:45:17 AM
   */
  @Trace(operationName = "D4-计算数据集取最新服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateNewestOfMultipleNumServiceComRespDto calculateNewestOfMultipleNumServiceCom(CalculateNewestOfMultipleNumServiceComReqDto reqDto){
    
      
      CalculateNewestOfMultipleNumRespDto newestOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集取最新（特殊方法） - calculateNewestOfMultipleNum
     //ModelCode: newestOfMultipleNum
        CalculateNewestOfMultipleNumRespDto newestOfMultipleNumRes = null;
    CalculateNewestOfMultipleNumReqDto newestOfMultipleNumReq=new CalculateNewestOfMultipleNumReqDto();
  if(reqDto!=null){
      newestOfMultipleNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703087_1
newestOfMultipleNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703088_1
    }
  if(reqDto!= null&&  reqDto.getNewestOfMultipleNumList() !=null&& !CollectionUtil.isEmpty(reqDto.getNewestOfMultipleNumList())){
      newestOfMultipleNumReq.setNewestOfMultipleNumList(reqDto.getNewestOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, NewestOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:139273_1
    }
  
    /*M4-计算数据集取最新（特殊方法）[3429]  用于数据集中最新一条数据算法 */
    
      newestOfMultipleNumRes = nbCalculationRules.calculateNewestOfMultipleNum(newestOfMultipleNumReq);
      
      
      newestOfMultipleNumRes_1 = newestOfMultipleNumRes;
    
CalculateNewestOfMultipleNumServiceComRespDto retData = new CalculateNewestOfMultipleNumServiceComRespDto();
  if(newestOfMultipleNumRes_1!=null){
      retData.setCommPrimaryKey(newestOfMultipleNumRes_1.getCommPrimaryKey());//SimpleFieldAssign//sourceId:1031000_1
      retData.setCalcResult(newestOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:139276_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算角色主观得分服务(公共)[3377]
   * gen by moon at 12/30/2022, 2:27:36 AM
   */
  @Trace(operationName = "D4-计算角色主观得分服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateRoleSubjectiveScoreServiceComRespDto calculateRoleSubjectiveScoreServiceCom(CalculateRoleSubjectiveScoreServiceComReqDto reqDto){
    
      
      CalculateRoleSubjectiveScoreRespDto calculateActualValueRes_1 =null;
//步骤0: M-计算角色主观得分 - calculateRoleSubjectiveScore
     //ModelCode: calculateActualValue
        CalculateRoleSubjectiveScoreRespDto calculateActualValueRes = null;
    CalculateRoleSubjectiveScoreReqDto calculateActualValueReq=new CalculateRoleSubjectiveScoreReqDto();
  if(reqDto!=null){
      calculateActualValueReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:133863_1
calculateActualValueReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:133864_1
calculateActualValueReq.setCalcPara3(reqDto.getCalcPara3());//SimpleFieldAssign//sourceId:133866_1
calculateActualValueReq.setCalcPara4(reqDto.getCalcPara4());//SimpleFieldAssign//sourceId:552087_1
calculateActualValueReq.setSubjectiveRatingTotalValue(reqDto.getSubjectiveRatingTotalValue());//SimpleFieldAssign//sourceId:133867_1
calculateActualValueReq.setSubjectiveScorePoint(reqDto.getSubjectiveScorePoint());//SimpleFieldAssign//sourceId:142418_1
calculateActualValueReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:133869_1
    }
  
    /*M-计算角色主观得分[2988]   */
    Assert.isNull(calculateActualValueReq.getCalcPara1(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-计算入参1不能为空",false);
Assert.isNull(calculateActualValueReq.getCalcPara2(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-计算入参2不能为空",false);
Assert.isNull(calculateActualValueReq.getCalcPara3(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-计算入参3不能为空",false);
Assert.isNull(calculateActualValueReq.getCalcPara4(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-计算入参4不能为空",false);
Assert.isNull(calculateActualValueReq.getSubjectiveRatingTotalValue(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-主观评分满分值不能为空",false);
Assert.isNull(calculateActualValueReq.getSubjectiveScorePoint(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-主观得分小数点规则不能为空",false);
Assert.isNull(calculateActualValueReq.getDecimalDigitsLastRules(),"D4-计算角色主观得分服务(公共)-M-计算角色主观得分-小数最后一位规则不能为空",false);
      calculateActualValueRes = nbCalculationRules.calculateRoleSubjectiveScore(calculateActualValueReq);
      
      
      calculateActualValueRes_1 = calculateActualValueRes;
    
CalculateRoleSubjectiveScoreServiceComRespDto retData = new CalculateRoleSubjectiveScoreServiceComRespDto();
  if(calculateActualValueRes_1!=null){
      retData.setCalcResult(calculateActualValueRes_1.getCalcResult());//SimpleFieldAssign//sourceId:135707_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集复合计算服务(公共)[3376]
   * gen by moon at 12/10/2022, 4:49:31 PM
   */
  @Trace(operationName = "D4-计算数据集复合计算服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateComplexCalcOfMultipleNumServiceComRespDto calculateComplexCalcOfMultipleNumServiceCom(CalculateComplexCalcOfMultipleNumServiceComReqDto reqDto){
    
      
      AddComplexCalcOfMultipleNumRespDto complexCalcOfMultipleNumRes_1 =null;
//步骤0: M4-数据集复合计算（特殊方法） - calculateComplexCalcOfMultipleNum
     //ModelCode: complexCalcOfMultipleNum
        AddComplexCalcOfMultipleNumRespDto complexCalcOfMultipleNumRes = null;
    AddComplexCalcOfMultipleNumReqDto complexCalcOfMultipleNumReq=new AddComplexCalcOfMultipleNumReqDto();
  if(reqDto!= null&&  reqDto.getComplexCalcOfMultipleNumList() !=null&& !CollectionUtil.isEmpty(reqDto.getComplexCalcOfMultipleNumList())){
      complexCalcOfMultipleNumReq.setComplexCalcOfMultipleNumList(reqDto.getComplexCalcOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, ComplexCalcOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:133859_1
    }
if(reqDto!=null){
      complexCalcOfMultipleNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:463511_1
complexCalcOfMultipleNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:133862_1
    }
  
    /*M4-数据集复合计算（特殊方法）[2972]  用户指标数据计算（参照进度值）。算法：A1：{进度值}，B1{权重}，A2：{进度值}，B2{权重}，An：{进度值}，Bn{权重}，(A1*B1+A2*B2+...+An*Bn)*100% */
    Assert.isNull(complexCalcOfMultipleNumReq.getDecimalPointRules(),"D4-计算数据集复合计算服务(公共)-M4-数据集复合计算（特殊方法）-小数点规则不能为空",false);
Assert.isNull(complexCalcOfMultipleNumReq.getDecimalDigitsLastRules(),"D4-计算数据集复合计算服务(公共)-M4-数据集复合计算（特殊方法）-小数最后一位规则不能为空",false);
      complexCalcOfMultipleNumRes = nbCalculationRules.addComplexCalcOfMultipleNum(complexCalcOfMultipleNumReq);
      
      
      complexCalcOfMultipleNumRes_1 = complexCalcOfMultipleNumRes;
    
CalculateComplexCalcOfMultipleNumServiceComRespDto retData = new CalculateComplexCalcOfMultipleNumServiceComRespDto();
  if(complexCalcOfMultipleNumRes_1!=null){
      retData.setCalcResult(complexCalcOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:134337_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算数据集求和服务(公共)[3375]
   * gen by moon at 2/1/2024, 7:56:33 PM
   */
  @Trace(operationName = "D4-计算数据集求和服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateSumOfMultipleNumServiceComRespDto calculateSumOfMultipleNumServiceCom(CalculateSumOfMultipleNumServiceComReqDto reqDto){
    
      
      AddSumOfMultipleNumRespDto sumOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集求和（特殊方法） - calculateSumOfMultipleNum
     //ModelCode: sumOfMultipleNum
        AddSumOfMultipleNumRespDto sumOfMultipleNumRes = null;
    AddSumOfMultipleNumReqDto sumOfMultipleNumReq=new AddSumOfMultipleNumReqDto();
  if(reqDto!=null){
      sumOfMultipleNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703079_1
sumOfMultipleNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703080_1
    }
  if(reqDto!= null&&  reqDto.getSumOfMultipleNumList() !=null&& !CollectionUtil.isEmpty(reqDto.getSumOfMultipleNumList())){
      sumOfMultipleNumReq.setSumOfMultipleNumList(reqDto.getSumOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, SumOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:133849_1
    }
  
    /*M4-计算数据集求和（特殊方法）[2971]  用户指标数据计算，入参数据集。将数据集的指定字段（数值字段）全部相加求和 */
    
      sumOfMultipleNumRes = nbCalculationRules.addSumOfMultipleNum(sumOfMultipleNumReq);
      
      
      sumOfMultipleNumRes_1 = sumOfMultipleNumRes;
    
CalculateSumOfMultipleNumServiceComRespDto retData = new CalculateSumOfMultipleNumServiceComRespDto();
  if(sumOfMultipleNumRes_1!=null){
      retData.setCalcResult(sumOfMultipleNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:138725_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算两个数值比服务(公共)[3374]
   * gen by moon at 12/30/2022, 2:27:18 AM
   */
  @Trace(operationName = "D4-计算两个数值比服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateRatioOfTwoNumServiceComRespDto calculateRatioOfTwoNumServiceCom(CalculateRatioOfTwoNumServiceComReqDto reqDto){
    
      
      CalculateRatioOfTwoNumRespDto ratioOfTwoNumRes_1 =null;
//步骤0: M-计算两个数值比（特殊方法） - calculateRatioOfTwoNum
     //ModelCode: ratioOfTwoNum
        CalculateRatioOfTwoNumRespDto ratioOfTwoNumRes = null;
    CalculateRatioOfTwoNumReqDto ratioOfTwoNumReq=new CalculateRatioOfTwoNumReqDto();
  if(reqDto!=null){
      ratioOfTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:133840_1
ratioOfTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:133841_1
ratioOfTwoNumReq.setCalcPara3(reqDto.getCalcPara3());//SimpleFieldAssign//sourceId:553392_1
ratioOfTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:133844_1
ratioOfTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:463500_1
    }
  
    /*M-计算两个数值比（特殊方法）[2970]  用户指标数据计算，入参两个数值。A/B*100% */
    Assert.isNull(ratioOfTwoNumReq.getCalcPara1(),"D4-计算两个数值比服务(公共)-M-计算两个数值比（特殊方法）-计算入参1不能为空",false);
Assert.isNull(ratioOfTwoNumReq.getCalcPara2(),"D4-计算两个数值比服务(公共)-M-计算两个数值比（特殊方法）-计算入参2不能为空",false);
Assert.isNull(ratioOfTwoNumReq.getCalcPara3(),"D4-计算两个数值比服务(公共)-M-计算两个数值比（特殊方法）-计算入参3不能为空",false);
Assert.isNull(ratioOfTwoNumReq.getDecimalDigitsLastRules(),"D4-计算两个数值比服务(公共)-M-计算两个数值比（特殊方法）-小数最后一位规则不能为空",false);
Assert.isNull(ratioOfTwoNumReq.getDecimalPointRules(),"D4-计算两个数值比服务(公共)-M-计算两个数值比（特殊方法）-小数点规则不能为空",false);
      ratioOfTwoNumRes = nbCalculationRules.calculateRatioOfTwoNum(ratioOfTwoNumReq);
      
      
      ratioOfTwoNumRes_1 = ratioOfTwoNumRes;
    
CalculateRatioOfTwoNumServiceComRespDto retData = new CalculateRatioOfTwoNumServiceComRespDto();
  if(ratioOfTwoNumRes_1!=null){
      retData.setCalcResult(ratioOfTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:140594_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算两个数差额比服务(公共)[3373]
   * gen by moon at 12/10/2022, 4:49:33 PM
   */
  @Trace(operationName = "D4-计算两个数差额比服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateRatioBetweenTwoNumServiceComRespDto calculateRatioBetweenTwoNumServiceCom(CalculateRatioBetweenTwoNumServiceComReqDto reqDto){
    
      
      CalculateRatioBetweenTwoNumRespDto ratioBetweenTwoNumRes_1 =null;
//步骤0: M-计算两个数差额比（特殊方法） - calculateRatioBetweenTwoNum
     //ModelCode: ratioBetweenTwoNum
        CalculateRatioBetweenTwoNumRespDto ratioBetweenTwoNumRes = null;
    CalculateRatioBetweenTwoNumReqDto ratioBetweenTwoNumReq=new CalculateRatioBetweenTwoNumReqDto();
  if(reqDto!=null){
      ratioBetweenTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:133829_1
ratioBetweenTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:133830_1
ratioBetweenTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:133833_1
ratioBetweenTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:133835_1
    }
  
    /*M-计算两个数差额比（特殊方法）[2969]  用户指标数据计算，入参两个数值。计算（A-B）/B *100% */
    Assert.isNull(ratioBetweenTwoNumReq.getCalcPara1(),"D4-计算两个数差额比服务(公共)-M-计算两个数差额比（特殊方法）-计算入参1不能为空",false);
Assert.isNull(ratioBetweenTwoNumReq.getCalcPara2(),"D4-计算两个数差额比服务(公共)-M-计算两个数差额比（特殊方法）-计算入参2不能为空",false);
Assert.isNull(ratioBetweenTwoNumReq.getDecimalDigitsLastRules(),"D4-计算两个数差额比服务(公共)-M-计算两个数差额比（特殊方法）-小数最后一位规则不能为空",false);
Assert.isNull(ratioBetweenTwoNumReq.getDecimalPointRules(),"D4-计算两个数差额比服务(公共)-M-计算两个数差额比（特殊方法）-小数点规则不能为空",false);
      ratioBetweenTwoNumRes = nbCalculationRules.calculateRatioBetweenTwoNum(ratioBetweenTwoNumReq);
      
      
      ratioBetweenTwoNumRes_1 = ratioBetweenTwoNumRes;
    
CalculateRatioBetweenTwoNumServiceComRespDto retData = new CalculateRatioBetweenTwoNumServiceComRespDto();
  if(ratioBetweenTwoNumRes_1!=null){
      retData.setCalcResult(ratioBetweenTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:134158_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算两个数相加服务(公共)[3372]
   * gen by moon at 2/26/2023, 5:09:34 PM
   */
  @Trace(operationName = "D4-计算两个数相加服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateAdditionOfTwoNumServiceComRespDto calculateAdditionOfTwoNumServiceCom(CalculateAdditionOfTwoNumServiceComReqDto reqDto){


      CalculateAdditionOfTwoNumRespDto additionOfTwoNumRes_1 =null;
//步骤0: M-计算两个数相加（特殊方法） - calculateAdditionOfTwoNum
     //ModelCode: additionOfTwoNum
        CalculateAdditionOfTwoNumRespDto additionOfTwoNumRes = null;
    CalculateAdditionOfTwoNumReqDto additionOfTwoNumReq=new CalculateAdditionOfTwoNumReqDto();
  if(reqDto!=null){
      additionOfTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703134_1
additionOfTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703135_1
      additionOfTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:133826_1
additionOfTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:133827_1
    }
  
    /*M-计算两个数相加（特殊方法）[2966]  用户指标数据计算，入参两个数值，计算两数之和 */
    
      additionOfTwoNumRes = nbCalculationRules.calculateAdditionOfTwoNum(additionOfTwoNumReq);
      
      
      additionOfTwoNumRes_1 = additionOfTwoNumRes;
    
CalculateAdditionOfTwoNumServiceComRespDto retData = new CalculateAdditionOfTwoNumServiceComRespDto();
  if(additionOfTwoNumRes_1!=null){
      retData.setCalcResult(additionOfTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:135508_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算两个数相除服务(公共)[4841]
   * gen by moon at 12/10/2022, 4:49:26 PM
   */
  @Trace(operationName = "D4-计算两个数相除服务(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateDivisionOfTwoNumComRespDto calculateDivisionOfTwoNumCom(CalculateDivisionOfTwoNumComReqDto reqDto){
    
      
      CalculateDivisionOfTwoNumRespDto divisionOfTwoNumRes_1 =null;
//步骤0: M4-计算两个数值相除（特殊方法） - calculateDivisionOfTwoNum
     //ModelCode: divisionOfTwoNum
        CalculateDivisionOfTwoNumRespDto divisionOfTwoNumRes = null;
    CalculateDivisionOfTwoNumReqDto divisionOfTwoNumReq=new CalculateDivisionOfTwoNumReqDto();
  if(reqDto!=null){
      divisionOfTwoNumReq.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:377982_1
divisionOfTwoNumReq.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:377983_1
divisionOfTwoNumReq.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:422192_1
divisionOfTwoNumReq.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:422193_1
    }
  
    /*M4-计算两个数值相除（特殊方法）[4842]   */
//    Assert.isNull(divisionOfTwoNumReq.getCalcPara1(),"D4-计算两个数相除服务(公共)-M4-计算两个数值相除（特殊方法）-计算入参1不能为空",false);
//Assert.isNull(divisionOfTwoNumReq.getCalcPara2(),"D4-计算两个数相除服务(公共)-M4-计算两个数值相除（特殊方法）-计算入参2不能为空",false);
Assert.isNull(divisionOfTwoNumReq.getDecimalPointRules(),"D4-计算两个数相除服务(公共)-M4-计算两个数值相除（特殊方法）-小数点规则不能为空",false);
Assert.isNull(divisionOfTwoNumReq.getDecimalDigitsLastRules(),"D4-计算两个数相除服务(公共)-M4-计算两个数值相除（特殊方法）-小数最后一位规则不能为空",false);
      divisionOfTwoNumRes = nbCalculationRules.calculateDivisionOfTwoNum(divisionOfTwoNumReq);
      
      
      divisionOfTwoNumRes_1 = divisionOfTwoNumRes;
    
CalculateDivisionOfTwoNumComRespDto retData = new CalculateDivisionOfTwoNumComRespDto();
  if(divisionOfTwoNumRes_1!=null){
      retData.setCalcResult(divisionOfTwoNumRes_1.getCalcResult());//SimpleFieldAssign//sourceId:377987_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算服务集合（基础）(公共)[5091]
   * gen by moon at 6/20/2023, 1:54:59 AM
   */
  @Trace(operationName = "D4-计算服务集合（基础）(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateCalcServiceCollectionComRespDto calculateCalcServiceCollectionCom(CalculateCalcServiceCollectionComReqDto reqDto){


      CalculateAdditionOfTwoNumServiceComRespDto calculateAdditionOfTwoNumServiceComRespDto_1 =null;
CalculateSubtractionOfTwoNumServiceComRespDto calculateSubtractionOfTwoNumServiceComRespDto_1 =null;
CalculateDivisionOfTwoNumComRespDto calculateDivisionOfTwoNumComRespDto_1 =null;
CalculateSumOfMultipleNumServiceComRespDto calculateSumOfMultipleNumServiceComRespDto_1 =null;
CalculateRatioBetweenTwoNumServiceComRespDto calculateRatioBetweenTwoNumServiceComRespDto_1 =null;
CalculateNewestOfMultipleNumServiceComRespDto calculateNewestOfMultipleNumServiceComRespDto_1 =null;
CalculateDataBigMiniRecordComRespDto calculateDataBigMiniRecordComRespDto_1 =null;
CalculateAverageOfMultipleNumServiceComRespDto calculateAverageOfMultipleNumServiceComRespDto_1 =null;
CalculatePartAveOfMultipleNumServiceComRespDto calculatePartAveOfMultipleNumServiceComRespDto_1 =null;
CalculateMultiplyTwoValuesComRespDto calculateMultiplyTwoValuesComRespDto_1 =null;
CalculateComplexCalcOfMultipleNumServiceComRespDto calculateComplexCalcOfMultipleNumServiceComRespDto_1 =null;
if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("ADDITION_OF_TWO_NUM")&&reqDto!= null&& reqDto.getCalcPara1() != null )) {
        //if((D4-计算服务集合(公共).通用计算公式 等于 两个数相加 and D4-计算服务集合(公共).计算入参1 值不等于空 ))  20902
        
CalculateAdditionOfTwoNumServiceComRespDto calculateAdditionOfTwoNumServiceComRespDto = null;
    CalculateAdditionOfTwoNumServiceComReqDto calculateAdditionOfTwoNumServiceComReqDto=new CalculateAdditionOfTwoNumServiceComReqDto();
  if(reqDto!=null){
      calculateAdditionOfTwoNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703138_1_20903
calculateAdditionOfTwoNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703139_1_20903
      calculateAdditionOfTwoNumServiceComReqDto.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:415587_1_20903
calculateAdditionOfTwoNumServiceComReqDto.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:415588_1_20903
    }
  
    /*D4-计算两个数相加服务(公共)[3372]   */

      calculateAdditionOfTwoNumServiceComRespDto = calculateAdditionOfTwoNumServiceCom(calculateAdditionOfTwoNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateAdditionOfTwoNumServiceComRespDto_1 = calculateAdditionOfTwoNumServiceComRespDto;
      }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("SUBTRACTION_OF_TWO_NUM")&&reqDto!= null&& reqDto.getCalcPara1() != null )){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 两个数相减 and D4-计算服务集合(公共).计算入参1 值不等于空 ))  20905
      
CalculateSubtractionOfTwoNumServiceComRespDto calculateSubtractionOfTwoNumServiceComRespDto = null;
    CalculateSubtractionOfTwoNumServiceComReqDto calculateSubtractionOfTwoNumServiceComReqDto=new CalculateSubtractionOfTwoNumServiceComReqDto();
  if(reqDto!=null){
      calculateSubtractionOfTwoNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703146_1_20906
calculateSubtractionOfTwoNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703147_1_20906
      calculateSubtractionOfTwoNumServiceComReqDto.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:415584_1_20906
calculateSubtractionOfTwoNumServiceComReqDto.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:415585_1_20906
    }
  
    /*D4-计算两个数相减服务(公共)[3365]   */

      calculateSubtractionOfTwoNumServiceComRespDto = calculateSubtractionOfTwoNumServiceCom(calculateSubtractionOfTwoNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateSubtractionOfTwoNumServiceComRespDto_1 = calculateSubtractionOfTwoNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("DIVISION_OF_TWO_NUM")&&reqDto!= null&& reqDto.getCalcPara1() != null &&reqDto!= null&& reqDto.getDecimalPointRules() != null &&reqDto!= null&& reqDto.getDecimalDigitsLastRules() != null &&reqDto!= null&& reqDto.getCalcPara2() != null &&reqDto!= null&& reqDto.getCalcPara2() != 0)){
       //elseif((D4-计算服务集合（基础）(公共).通用计算公式 等于 两个数相除 and D4-计算服务集合（基础）(公共).计算入参1 值不等于空  and D4-计算服务集合（基础）(公共).小数点规则 值不等于空  and D4-计算服务集合（基础）(公共).小数最后一位规则 值不等于空  and D4-计算服务集合（基础）(公共).计算入参2 值不等于空  and D4-计算服务集合（基础）(公共).计算入参2 不等于 0))  20908
      
CalculateDivisionOfTwoNumComRespDto calculateDivisionOfTwoNumComRespDto = null;
    CalculateDivisionOfTwoNumComReqDto calculateDivisionOfTwoNumComReqDto=new CalculateDivisionOfTwoNumComReqDto();
  if(reqDto!=null){
      calculateDivisionOfTwoNumComReqDto.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:415578_1_20909
calculateDivisionOfTwoNumComReqDto.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:415579_1_20909
calculateDivisionOfTwoNumComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:422196_1_20909
calculateDivisionOfTwoNumComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:422197_1_20909
    }
  
    /*D4-计算两个数相除服务(公共)[4841]   */
Assert.isNull(calculateDivisionOfTwoNumComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数相除服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateDivisionOfTwoNumComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数相除服务(公共)-小数最后一位规则不能为空",false);
      calculateDivisionOfTwoNumComRespDto = calculateDivisionOfTwoNumCom(calculateDivisionOfTwoNumComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateDivisionOfTwoNumComRespDto_1 = calculateDivisionOfTwoNumComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("SUM_OF_MULTIPLE_NUM")&&reqDto!= null&&  reqDto.getDataSetsListOne() !=null && reqDto.getDataSetsListOne().size()>0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 数据集求和 and D4-计算服务集合(公共).数据集列表一数据集条数 大于 0))  22850
      
CalculateSumOfMultipleNumServiceComRespDto calculateSumOfMultipleNumServiceComRespDto = null;
    CalculateSumOfMultipleNumServiceComReqDto calculateSumOfMultipleNumServiceComReqDto=new CalculateSumOfMultipleNumServiceComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateSumOfMultipleNumServiceComReqDto.setSumOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, SumOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:463629_1_22852
    }
  
    /*D4-计算数据集求和服务(公共)[3375]   */
    
      calculateSumOfMultipleNumServiceComRespDto = calculateSumOfMultipleNumServiceCom(calculateSumOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateSumOfMultipleNumServiceComRespDto_1 = calculateSumOfMultipleNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("RATIO_BETWEEN_TWO_NUM")&&reqDto!= null&& reqDto.getCalcPara1() != null &&reqDto!= null&& reqDto.getDecimalPointRules() != null &&reqDto!= null&& reqDto.getDecimalDigitsLastRules() != null &&reqDto!= null&& reqDto.getCalcPara2() != 0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 两个数差额比 and D4-计算服务集合(公共).计算入参1 值不等于空  and D4-计算服务集合(公共).小数点规则 值不等于空  and D4-计算服务集合(公共).小数最后一位规则 值不等于空  and D4-计算服务集合(公共).计算入参2 不等于 0))  22857
      
CalculateRatioBetweenTwoNumServiceComRespDto calculateRatioBetweenTwoNumServiceComRespDto = null;
    CalculateRatioBetweenTwoNumServiceComReqDto calculateRatioBetweenTwoNumServiceComReqDto=new CalculateRatioBetweenTwoNumServiceComReqDto();
  if(reqDto!=null){
      calculateRatioBetweenTwoNumServiceComReqDto.setCalcPara1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:415590_1_22858
calculateRatioBetweenTwoNumServiceComReqDto.setCalcPara2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:415591_1_22858
calculateRatioBetweenTwoNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:415592_1_22858
calculateRatioBetweenTwoNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:415593_1_22858
    }
  
    /*D4-计算两个数差额比服务(公共)[3373]   */
    Assert.isNull(calculateRatioBetweenTwoNumServiceComReqDto.getCalcPara1(),"D4-计算服务集合（基础）(公共)-D4-计算两个数差额比服务(公共)-计算入参1不能为空",false);
Assert.isNull(calculateRatioBetweenTwoNumServiceComReqDto.getCalcPara2(),"D4-计算服务集合（基础）(公共)-D4-计算两个数差额比服务(公共)-计算入参2不能为空",false);
Assert.isNull(calculateRatioBetweenTwoNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数差额比服务(公共)-小数最后一位规则不能为空",false);
Assert.isNull(calculateRatioBetweenTwoNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数差额比服务(公共)-小数点规则不能为空",false);
      calculateRatioBetweenTwoNumServiceComRespDto = calculateRatioBetweenTwoNumServiceCom(calculateRatioBetweenTwoNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateRatioBetweenTwoNumServiceComRespDto_1 = calculateRatioBetweenTwoNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("NEWEST_OF_MULTIPLE_NUM")&&reqDto!= null&&  reqDto.getDataSetsListOne() !=null && reqDto.getDataSetsListOne().size()>0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 数据集取最新 and D4-计算服务集合(公共).数据集列表一数据集条数 大于 0))  22864
      
CalculateNewestOfMultipleNumServiceComRespDto calculateNewestOfMultipleNumServiceComRespDto = null;
    CalculateNewestOfMultipleNumServiceComReqDto calculateNewestOfMultipleNumServiceComReqDto=new CalculateNewestOfMultipleNumServiceComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateNewestOfMultipleNumServiceComReqDto.setNewestOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, NewestOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:463627_1_22865
    }
  
    /*D4-计算数据集取最新服务(公共)[3430]   */
    
      calculateNewestOfMultipleNumServiceComRespDto = calculateNewestOfMultipleNumServiceCom(calculateNewestOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateNewestOfMultipleNumServiceComRespDto_1 = calculateNewestOfMultipleNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("MAX_OR_MIN_OF_MULTIPLE_NUM")&&reqDto!= null&& reqDto.getCalcMaxAndMin() != null &&reqDto!= null&&  reqDto.getDataSetsListOne() !=null && reqDto.getDataSetsListOne().size()>0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 数据集求最大最小值 and D4-计算服务集合(公共).求最大最小值 值不等于空  and D4-计算服务集合(公共).数据集列表一数据集条数 大于 0))  22866
      
CalculateDataBigMiniRecordComRespDto calculateDataBigMiniRecordComRespDto = null;
    CalculateDataBigMiniRecordComReqDto calculateDataBigMiniRecordComReqDto=new CalculateDataBigMiniRecordComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateDataBigMiniRecordComReqDto.setDataBigMiniRecordList(//objList-to-objLists
        reqDto.getDataSetsListOne().stream().map(item -> {
      DataBigMiniRecordDto elm = new DataBigMiniRecordDto();
      if(item!=null){
      elm.setContentID(item.getCommPrimaryKey());//SimpleFieldAssign//sourceId:124034_2_22867
elm.setOutputNum(reqDto.getCalcPara1()!=null?reqDto.getCalcPara1().longValue():null);//两个数组关联数量不一致; 导致逐个赋值; 有概率付错值; //SimpleFieldAssign//sourceId:163063_2_22867
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:463532_1_22867
    }
if(reqDto!=null){
      calculateDataBigMiniRecordComReqDto.setCalcMaxAndMin(reqDto.getCalcMaxAndMin());//SimpleFieldAssign//sourceId:463533_1_22867
    }
  
    /*D2计算数据集最大小值记录(公共)[5162]   */
    Assert.isNull(calculateDataBigMiniRecordComReqDto.getCalcMaxAndMin(),"D4-计算服务集合（基础）(公共)-D2计算数据集最大小值记录(公共)-求最大最小值不能为空",false);
      calculateDataBigMiniRecordComRespDto = fwCompInterfaceModeClient.calculateDataBigMiniRecordCom(calculateDataBigMiniRecordComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      calculateDataBigMiniRecordComRespDto_1 = calculateDataBigMiniRecordComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("AVERAGE_OF_MULTIPLE_NUM")&&reqDto!= null&&  reqDto.getDataSetsListOne() !=null && reqDto.getDataSetsListOne().size()>0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 数据集求平均值 and D4-计算服务集合(公共).数据集列表一数据集条数 大于 0))  22870
      
CalculateAverageOfMultipleNumServiceComRespDto calculateAverageOfMultipleNumServiceComRespDto = null;
    CalculateAverageOfMultipleNumServiceComReqDto calculateAverageOfMultipleNumServiceComReqDto=new CalculateAverageOfMultipleNumServiceComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateAverageOfMultipleNumServiceComReqDto.setAverageOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, AverageOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:415613_1_22871
    }
if(reqDto!=null){
      calculateAverageOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:415618_1_22871
calculateAverageOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:415619_1_22871
    }
  
    /*D4-计算数据集求平均值服务(公共)[3438]   */
    Assert.isNull(calculateAverageOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集求平均值服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateAverageOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集求平均值服务(公共)-小数最后一位规则不能为空",false);
      calculateAverageOfMultipleNumServiceComRespDto = calculateAverageOfMultipleNumServiceCom(calculateAverageOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculateAverageOfMultipleNumServiceComRespDto_1 = calculateAverageOfMultipleNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("PART_AVE_OF_MULTIPLE_NUM")&&reqDto!= null&&  reqDto.getDataSetsListOne() !=null && reqDto.getDataSetsListOne().size()>0)){
       //elseif((D4-计算服务集合(公共).通用计算公式 等于 数据集去除最大最小求平均 and D4-计算服务集合(公共).数据集列表一数据集条数 大于 0))  22872
      
CalculatePartAveOfMultipleNumServiceComRespDto calculatePartAveOfMultipleNumServiceComRespDto = null;
    CalculatePartAveOfMultipleNumServiceComReqDto calculatePartAveOfMultipleNumServiceComReqDto=new CalculatePartAveOfMultipleNumServiceComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculatePartAveOfMultipleNumServiceComReqDto.setPartAveOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, PartAveOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:486555_1_22873
    }
if(reqDto!=null){
      calculatePartAveOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:415624_1_22873
calculatePartAveOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:415625_1_22873
    }
  
    /*D4-计算数据集去除最大最小求平均服务(公共)[3439]   */
    Assert.isNull(calculatePartAveOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集去除最大最小求平均服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculatePartAveOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集去除最大最小求平均服务(公共)-小数最后一位规则不能为空",false);
      calculatePartAveOfMultipleNumServiceComRespDto = calculatePartAveOfMultipleNumServiceCom(calculatePartAveOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;
      
      
      calculatePartAveOfMultipleNumServiceComRespDto_1 = calculatePartAveOfMultipleNumServiceComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("MULTI_OF_TWO_NUM"))){
       //elseif(D4-计算服务集合(公共).通用计算公式 等于 两个数相乘)  24716

CalculateMultiplyTwoValuesComRespDto calculateMultiplyTwoValuesComRespDto = null;
    CalculateMultiplyTwoValuesComReqDto calculateMultiplyTwoValuesComReqDto=new CalculateMultiplyTwoValuesComReqDto();
  if(reqDto!=null){
      calculateMultiplyTwoValuesComReqDto.setComFloatField1(reqDto.getCalcPara1());//SimpleFieldAssign//sourceId:505134_1_24720
calculateMultiplyTwoValuesComReqDto.setComFloatField2(reqDto.getCalcPara2());//SimpleFieldAssign//sourceId:505135_1_24720
calculateMultiplyTwoValuesComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:505145_1_24720
calculateMultiplyTwoValuesComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:505146_1_24720
    }

    /*D4-计算两个数值相乘服务(公共)[5443]   */
Assert.isNull(calculateMultiplyTwoValuesComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数值相乘服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateMultiplyTwoValuesComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算两个数值相乘服务(公共)-小数最后一位规则不能为空",false);
      calculateMultiplyTwoValuesComRespDto = interfaceModeService.calculateMultiplyTwoValuesCom(calculateMultiplyTwoValuesComReqDto)/*vcase invoke isSameApp*/;


      calculateMultiplyTwoValuesComRespDto_1 = calculateMultiplyTwoValuesComRespDto;
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("COMPLEX_CALC_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合(公共).通用计算公式 等于 数据集复合计算)  31261

CalculateComplexCalcOfMultipleNumServiceComRespDto calculateComplexCalcOfMultipleNumServiceComRespDto = null;
    CalculateComplexCalcOfMultipleNumServiceComReqDto calculateComplexCalcOfMultipleNumServiceComReqDto=new CalculateComplexCalcOfMultipleNumServiceComReqDto();
  if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateComplexCalcOfMultipleNumServiceComReqDto.setComplexCalcOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, ComplexCalcOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:463628_1_31262
    }
if(reqDto!=null){
      calculateComplexCalcOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:463516_1_31262
calculateComplexCalcOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:463517_1_31262
    }

    /*D4-计算数据集复合计算服务(公共)[3376]   */
    Assert.isNull(calculateComplexCalcOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集复合计算服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateComplexCalcOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（基础）(公共)-D4-计算数据集复合计算服务(公共)-小数最后一位规则不能为空",false);
      calculateComplexCalcOfMultipleNumServiceComRespDto = calculateComplexCalcOfMultipleNumServiceCom(calculateComplexCalcOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;


      calculateComplexCalcOfMultipleNumServiceComRespDto_1 = calculateComplexCalcOfMultipleNumServiceComRespDto;
    }
CalculateCalcServiceCollectionComRespDto retData = new CalculateCalcServiceCollectionComRespDto();
  if(calculateAdditionOfTwoNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateAdditionOfTwoNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateSubtractionOfTwoNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateSubtractionOfTwoNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateDivisionOfTwoNumComRespDto_1!=null){
      retData.setCalcResult(calculateDivisionOfTwoNumComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateSumOfMultipleNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateSumOfMultipleNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateRatioBetweenTwoNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateRatioBetweenTwoNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateComplexCalcOfMultipleNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateComplexCalcOfMultipleNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateNewestOfMultipleNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateNewestOfMultipleNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateDataBigMiniRecordComRespDto_1!=null){
      retData.setCalcResult(calculateDataBigMiniRecordComRespDto_1.getOutputNum()!=null?Double.valueOf(calculateDataBigMiniRecordComRespDto_1.getOutputNum()):null);//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateAverageOfMultipleNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculateAverageOfMultipleNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculatePartAveOfMultipleNumServiceComRespDto_1!=null){
      retData.setCalcResult(calculatePartAveOfMultipleNumServiceComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
if(calculateMultiplyTwoValuesComRespDto_1!=null){
    retData.setCalcResult(calculateMultiplyTwoValuesComRespDto_1.getCalcResult());//SimpleFieldAssign//sourceId:415774_1
    }
  

  
  
return retData;
  }
/**
   * D4-计算服务集合（数据集）(公共)[5983]
   * gen by moon at 6/11/2023, 2:00:00 AM
   */
  @Trace(operationName = "D4-计算服务集合（数据集）(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public ImplementCalcServiceCollectionOfMultipleNumComRespDto implementCalcServiceCollectionOfMultipleNumCom(ImplementCalcServiceCollectionOfMultipleNumComReqDto reqDto){


      ImplementReceiveFieldRespDto receptionServiceRes_1 =null;
if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("SUM_OF_MULTIPLE_NUM"))) {
        //if(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集求和)  31275

CalculateSumOfMultipleNumServiceComRespDto calculateSumOfMultipleNumServiceComRespDto = null;
    CalculateSumOfMultipleNumServiceComReqDto calculateSumOfMultipleNumServiceComReqDto=new CalculateSumOfMultipleNumServiceComReqDto();
  if(reqDto!=null){
      calculateSumOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703083_1_31276
calculateSumOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703084_1_31276
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateSumOfMultipleNumServiceComReqDto.setSumOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, SumOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:703049_1_31276
    }

    /*D4-计算数据集求和服务(公共)[3375]   */

      calculateSumOfMultipleNumServiceComRespDto = calculateSumOfMultipleNumServiceCom(calculateSumOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes = null;
    if(calculateSumOfMultipleNumServiceComRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq=new ImplementReceiveFieldReqDto();
  if(calculateSumOfMultipleNumServiceComRespDto!=null){
      receptionServiceReq.setCalcResult(calculateSumOfMultipleNumServiceComRespDto.getCalcResult());//SimpleFieldAssign//sourceId:703048_1_31288
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes = nbCalculationRules.implementReceiveField(receptionServiceReq);


      receptionServiceRes_1 = receptionServiceRes;
           }
      }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("COMPLEX_CALC_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集复合计算)  31278

CalculateComplexCalcOfMultipleNumServiceComRespDto calculateComplexCalcOfMultipleNumServiceComRespDto = null;
    CalculateComplexCalcOfMultipleNumServiceComReqDto calculateComplexCalcOfMultipleNumServiceComReqDto=new CalculateComplexCalcOfMultipleNumServiceComReqDto();
  if(reqDto!=null){
      calculateComplexCalcOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703054_1_31283
calculateComplexCalcOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703052_1_31283
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateComplexCalcOfMultipleNumServiceComReqDto.setComplexCalcOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, ComplexCalcOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:703051_1_31283
    }

    /*D4-计算数据集复合计算服务(公共)[3376]   */
    Assert.isNull(calculateComplexCalcOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集复合计算服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateComplexCalcOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集复合计算服务(公共)-小数最后一位规则不能为空",false);
      calculateComplexCalcOfMultipleNumServiceComRespDto = calculateComplexCalcOfMultipleNumServiceCom(calculateComplexCalcOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes_2 = null;
    if(calculateComplexCalcOfMultipleNumServiceComRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq_1=new ImplementReceiveFieldReqDto();
  if(calculateComplexCalcOfMultipleNumServiceComRespDto!=null){
      receptionServiceReq_1.setCalcResult(calculateComplexCalcOfMultipleNumServiceComRespDto.getCalcResult());//SimpleFieldAssign//sourceId:703048_1_31289
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_1.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes_2 = nbCalculationRules.implementReceiveField(receptionServiceReq_1);


      receptionServiceRes_1 = receptionServiceRes_2;
           }
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("NEWEST_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集取最新)  31279

CalculateNewestOfMultipleNumServiceComRespDto calculateNewestOfMultipleNumServiceComRespDto = null;
    CalculateNewestOfMultipleNumServiceComReqDto calculateNewestOfMultipleNumServiceComReqDto=new CalculateNewestOfMultipleNumServiceComReqDto();
  if(reqDto!=null){
      calculateNewestOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703091_1_31284
calculateNewestOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703092_1_31284
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateNewestOfMultipleNumServiceComReqDto.setNewestOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, NewestOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:703055_1_31284
    }

    /*D4-计算数据集取最新服务(公共)[3430]   */

      calculateNewestOfMultipleNumServiceComRespDto = calculateNewestOfMultipleNumServiceCom(calculateNewestOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes_3 = null;
    if(calculateNewestOfMultipleNumServiceComRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq_2=new ImplementReceiveFieldReqDto();
  if(calculateNewestOfMultipleNumServiceComRespDto!=null){
      receptionServiceReq_2.setCalcResult(calculateNewestOfMultipleNumServiceComRespDto.getCalcResult());//SimpleFieldAssign//sourceId:703048_1_31290
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_2.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes_3 = nbCalculationRules.implementReceiveField(receptionServiceReq_2);


      receptionServiceRes_1 = receptionServiceRes_3;
           }
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("MAX_OR_MIN_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集求最大最小值)  31280

CalculateDataBigMiniRecordComNewRespDto calculateDataBigMiniRecordComNewRespDto = null;
    CalculateDataBigMiniRecordComNewReqDto calculateDataBigMiniRecordComNewReqDto=new CalculateDataBigMiniRecordComNewReqDto();
  if(reqDto!=null){
      calculateDataBigMiniRecordComNewReqDto.setCalcMaxAndMin(reqDto.getCalcMaxAndMin());//SimpleFieldAssign//sourceId:703126_1_31294
calculateDataBigMiniRecordComNewReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703127_1_31294
calculateDataBigMiniRecordComNewReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703128_1_31294
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateDataBigMiniRecordComNewReqDto.setDataBigMiniRecordList(//objList-to-objLists
        reqDto.getDataSetsListOne().stream().map(item -> {
            // TODO: 2023/2/26 手写代码 
      com.wicket.okrcalc.biz.service.dto.common.DataBigMiniRecordDto elm = new com.wicket.okrcalc.biz.service.dto.common.DataBigMiniRecordDto();
      if(item!=null){
      elm.setCommPrimaryKey(item.getCommPrimaryKey());//SimpleFieldAssign//sourceId:163147_2_31294
elm.setComFloatField1(item.getCalcPara1());//SimpleFieldAssign//sourceId:163148_2_31294
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:703129_1_31294
    }

    /*D4-计算数据集最大小值记录(公共)[5984]   */
    Assert.isNull(calculateDataBigMiniRecordComNewReqDto.getCalcMaxAndMin(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集最大小值记录(公共)-求最大最小值不能为空",false);
      calculateDataBigMiniRecordComNewRespDto = interfaceModeService.calculateDataBigMiniRecordComNew(calculateDataBigMiniRecordComNewReqDto)/*vcase invoke isSameApp*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes_4 = null;
    if(calculateDataBigMiniRecordComNewRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq_3=new ImplementReceiveFieldReqDto();
  if(calculateDataBigMiniRecordComNewRespDto!=null){
      receptionServiceReq_3.setCalcResult(calculateDataBigMiniRecordComNewRespDto.getComFloatField1());//SimpleFieldAssign//sourceId:703048_1_31291
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_3.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes_4 = nbCalculationRules.implementReceiveField(receptionServiceReq_3);


      receptionServiceRes_1 = receptionServiceRes_4;
           }
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("AVERAGE_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集求平均值)  31281

CalculateAverageOfMultipleNumServiceComRespDto calculateAverageOfMultipleNumServiceComRespDto = null;
    CalculateAverageOfMultipleNumServiceComReqDto calculateAverageOfMultipleNumServiceComReqDto=new CalculateAverageOfMultipleNumServiceComReqDto();
  if(reqDto!=null){
      calculateAverageOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703063_1_31286
calculateAverageOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703064_1_31286
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculateAverageOfMultipleNumServiceComReqDto.setAverageOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, AverageOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:703061_1_31286
    }

    /*D4-计算数据集求平均值服务(公共)[3438]   */
    Assert.isNull(calculateAverageOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集求平均值服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculateAverageOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集求平均值服务(公共)-小数最后一位规则不能为空",false);
      calculateAverageOfMultipleNumServiceComRespDto = calculateAverageOfMultipleNumServiceCom(calculateAverageOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes_5 = null;
    if(calculateAverageOfMultipleNumServiceComRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq_4=new ImplementReceiveFieldReqDto();
  if(calculateAverageOfMultipleNumServiceComRespDto!=null){
      receptionServiceReq_4.setCalcResult(calculateAverageOfMultipleNumServiceComRespDto.getCalcResult());//SimpleFieldAssign//sourceId:703048_1_31292
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_4.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes_5 = nbCalculationRules.implementReceiveField(receptionServiceReq_4);


      receptionServiceRes_1 = receptionServiceRes_5;
           }
    }
else if((reqDto!= null&&  reqDto.getCalcFormula() !=null && reqDto.getCalcFormula().equals("PART_AVE_OF_MULTIPLE_NUM"))){
       //elseif(D4-计算服务集合（数据集）(公共).通用计算公式 等于 数据集去除最大最小求平均)  31282

CalculatePartAveOfMultipleNumServiceComRespDto calculatePartAveOfMultipleNumServiceComRespDto = null;
    CalculatePartAveOfMultipleNumServiceComReqDto calculatePartAveOfMultipleNumServiceComReqDto=new CalculatePartAveOfMultipleNumServiceComReqDto();
  if(reqDto!=null){
      calculatePartAveOfMultipleNumServiceComReqDto.setDecimalPointRules(reqDto.getDecimalPointRules());//SimpleFieldAssign//sourceId:703066_1_31287
calculatePartAveOfMultipleNumServiceComReqDto.setDecimalDigitsLastRules(reqDto.getDecimalDigitsLastRules());//SimpleFieldAssign//sourceId:703067_1_31287
    }
if(reqDto!= null&&  reqDto.getDataSetsListOne() !=null&& !CollectionUtil.isEmpty(reqDto.getDataSetsListOne())){
      calculatePartAveOfMultipleNumServiceComReqDto.setPartAveOfMultipleNumList(reqDto.getDataSetsListOne().stream().map(item -> BeanUtil.toBean(item, PartAveOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:703068_1_31287
    }

    /*D4-计算数据集去除最大最小求平均服务(公共)[3439]   */
    Assert.isNull(calculatePartAveOfMultipleNumServiceComReqDto.getDecimalPointRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集去除最大最小求平均服务(公共)-小数点规则不能为空",false);
Assert.isNull(calculatePartAveOfMultipleNumServiceComReqDto.getDecimalDigitsLastRules(),"D4-计算服务集合（数据集）(公共)-D4-计算数据集去除最大最小求平均服务(公共)-小数最后一位规则不能为空",false);
      calculatePartAveOfMultipleNumServiceComRespDto = calculatePartAveOfMultipleNumServiceCom(calculatePartAveOfMultipleNumServiceComReqDto)/*vcase invoke 同服务,同domain*/;



//ModelCode: receptionService
        ImplementReceiveFieldRespDto receptionServiceRes_6 = null;
    if(calculatePartAveOfMultipleNumServiceComRespDto !=null){
          ImplementReceiveFieldReqDto receptionServiceReq_5=new ImplementReceiveFieldReqDto();
  if(calculatePartAveOfMultipleNumServiceComRespDto!=null){
      receptionServiceReq_5.setCalcResult(calculatePartAveOfMultipleNumServiceComRespDto.getCalcResult());//SimpleFieldAssign//sourceId:703048_1_31293
    }

    /*约定出参字段：计算结果[2950]  用于特殊方法接收上游入参。 */
    Assert.isNull(receptionServiceReq_5.getCalcResult(),"D4-计算服务集合（数据集）(公共)-约定出参字段：计算结果-计算结果不能为空",false);
      receptionServiceRes_6 = nbCalculationRules.implementReceiveField(receptionServiceReq_5);


      receptionServiceRes_1 = receptionServiceRes_6;
           }
    }
ImplementCalcServiceCollectionOfMultipleNumComRespDto retData = new ImplementCalcServiceCollectionOfMultipleNumComRespDto();
  if(receptionServiceRes_1!=null){
      retData.setCalcResult(receptionServiceRes_1.getCalcResult());//SimpleFieldAssign//sourceId:703076_1
    }




return retData;
  }
/**
   * D4-计算数据集取最早(公共)[7233]
   * gen by moon at 6/23/2023, 11:58:47 PM
   */
  @Trace(operationName = "D4-计算数据集取最早(公共)")
  @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Transactional(rollbackFor=Exception.class)
  @Override
  public CalculateOldestOfMultipleNumComRespDto calculateOldestOfMultipleNumCom(CalculateOldestOfMultipleNumComReqDto reqDto){


      CalculateOldestOfMultipleNumRespDto oldestOfMultipleNumRes_1 =null;
//步骤0: M4-计算数据集取最早（特殊方法） - calculateOldestOfMultipleNum
     //ModelCode: oldestOfMultipleNum
        CalculateOldestOfMultipleNumRespDto oldestOfMultipleNumRes = null;
    CalculateOldestOfMultipleNumReqDto oldestOfMultipleNumReq=new CalculateOldestOfMultipleNumReqDto();
  if(reqDto!=null){
      oldestOfMultipleNumReq.setOldestOfMultipleNumList(reqDto.getOldestOfMultipleNumList().stream().map(item -> BeanUtil.toBean(item, OldestOfMultipleNumDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1053153_1
    }

    /*M4-计算数据集取最早（特殊方法）[7232]  数据集根据时间取最早一条 */

      oldestOfMultipleNumRes = nbCalculationRules.calculateOldestOfMultipleNum(oldestOfMultipleNumReq);


      oldestOfMultipleNumRes_1 = oldestOfMultipleNumRes;

CalculateOldestOfMultipleNumComRespDto retData = new CalculateOldestOfMultipleNumComRespDto();
  if(oldestOfMultipleNumRes_1!=null){
      retData.setCommPrimaryKey(oldestOfMultipleNumRes_1.getCommPrimaryKey());//SimpleFieldAssign//sourceId:1053156_1
    }




return retData;
  }
    
    //
}
